<?php
class GmGiftCodeVo extends SzAbstractMySqlVo
{

    private $batchId;
    private $giftCode;
    private $isUsed;

    /**
     * Initialize GmGiftCodeVo.
     *
     * @param $batchId
     * @param $giftCode
     * @param $isUsed
     * @param boolean $isInsert default false, means for now this vo is initialized not for insert process
     * @return GmGiftCodeVo
     */
    public function __construct($batchId, $giftCode, $isUsed, $isInsert = false) {
        $this->batchId = $batchId;
        $this->giftCode = $giftCode;
        $this->isUsed = $isUsed;

        $this->isInsert = $isInsert;
        $this->voClassName = 'GmGiftCodeVo';
        $this->ormName = 'GmGiftCode';
    }

    /**
     * @see SzAbstractVo::toArray
     */
    public function toArray($needEncode = false)
    {
        return array(
            'batchId' => $this->getBatchId(),
            'giftCode' => $this->getGiftCode(),
            'isUsed' => $this->getIsUsed(),
        );
    }

    /**
     * @see SzAbstractVo::toEntireArray
     */
    public function toEntireArray($needEncode = false)
    {
        return array(
            'batchId' => $this->getBatchId(),
            'giftCode' => $this->getGiftCode(),
            'isUsed' => $this->getIsUsed(),
        );
    }

    /**
     * @see SzAbstractVo::toPureArray
     */
    public function toPureArray()
    {
        return array(
            $this->getBatchId(),
            $this->getGiftCode(),
            $this->getIsUsed(),
        );
    }

    public function getBatchId()
    {
        return $this->batchId;
    }

    public function setBatchId($val)
    {
        $this->saveColumnStatus(0, $this->batchId);
        $this->batchId = $val;
    }

    public function getGiftCode()
    {
        return $this->giftCode;
    }

    public function setGiftCode($val)
    {
        $this->saveColumnStatus(1, $this->giftCode);
        $this->giftCode = $val;
    }

    public function getIsUsed()
    {
        return $this->isUsed;
    }

    public function setIsUsed($val)
    {
        $this->saveColumnStatus(2, $this->isUsed);
        $this->isUsed = $val;
    }

}